博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在一个页面加载另一个渲染的页面
阅读量:6938 次
发布时间:2019-06-27

本文共 2374 字,大约阅读时间需要 7 分钟。

 
     
     
       
           
       
     
 

@RequestMapping(value = "similarProduct.json", method = RequestMethod.POST) public String getSimilarProduct(HttpServletRequest request,                                 ModelMap model,                                 @RequestParam(value = "maxResult") int maxResult,                                 @RequestParam(value = "pageNo") int pageNo,                                 @RequestParam(value = "productId", defaultValue = "0") long productId,                                 HttpSession session) {
   Locale currentLocale = getRequestLanguage(session, request);    ProductJsons productJsons = null;    productJsons = extendProductService.moreLikeTag(productId, maxResult, currentLocale.toString());    if (productJsons != null) {
       if (productJsons.getProductJsonList() != null) {
           ArrayList
ids = new ArrayList<>();            for (ProductJson productJson : productJsons.getProductJsonList()) {
               ids.add(productJson.getId());            }            model.addAttribute("ratingMap", getAverageRatingById(ids));            model.addAttribute("checkWish", checkWishById(ids));            model.addAttribute("productJsons", productJsons);        }    }    return "moreLikeThis"; }

moreLikeThis.jsp

<%@ page language="java" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
 
 
     
       
     
 
本文转自wiwi博客51CTO博客,原文链接http://blog.51cto.com/wiwili/1968589如需转载请自行联系原作者
wiwili
你可能感兴趣的文章
ffmpeg mediacodec 硬解初探
查看>>
Cocostudio 1.4 实现的DemoShop
查看>>
request.getParameter(“参数名”) 中文乱码解决方法
查看>>
Ambari-Blueprint介绍
查看>>
可编辑ztree节点的增删改功能图标控制---已解决
查看>>
Android-自己定义标题栏
查看>>
C# Winform利用POST传值方式模拟表单提交数据(Winform与网页交互)
查看>>
LeetCode【8】. String to Integer (atoi) --java实现
查看>>
微信小程序开发教程目录
查看>>
Java进阶路线图
查看>>
C - The C Answer (2nd Edition) - Exercise 1-4
查看>>
java基本类型(数值范围):浮点的底层表示定义,float计算快一些
查看>>
[React Native] change port when running react native
查看>>
[转] 利用BLKTRACE分析IO性能
查看>>
easyui combobox下拉列表的多选值
查看>>
Xamarin iOS教程之编辑界面编写代码
查看>>
H5 和移动端 WebView 缓存机制解析与实战
查看>>
ORA-38760: This database instance failed to turn on flashback database
查看>>
【DB】MYSQL相关细节
查看>>
C#中的反射
查看>>